package com.yonyou.cyxdms.basedata.service.service.series;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yonyou.cyxdms.basedata.client.domains.vo.SeriesCacheVO;
import com.yonyou.cyxdms.basedata.service.dto.vehiclemodel.GeneralSeriesDTO;
import com.yonyou.cyxdms.basedata.service.dto.vehiclemodel.SeriesImportDTO;
import com.yonyou.cyxdms.basedata.service.dto.vehiclemodel.SeriesModifyDTO;
import com.yonyou.cyxdms.basedata.service.dto.vehiclemodel.SeriesQueryDTO;
import com.yonyou.cyxdms.basedata.service.entity.series.SeriesPO;
import com.yonyou.cyxdms.basedata.service.vo.CarserialDetailsVO;
import com.yonyou.cyxdms.basedata.service.vo.CarserialInfoVO;
import com.yonyou.cyxdms.basedata.service.vo.series.SeriesDictVO;
import com.yonyou.cyxdms.basedata.service.vo.series.VehicleProductSeriesVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 车系
 *
 * @author renwd
 * @since 2018/12/10
 */
public interface SeriesService {

    /**
     * 按条件查询车系信息
     *
     * @param queryParam
     * @return java.util.List<com.yonyou.cyxdms.basedata.client.domains.DTO.basedata.SeriesCacheVO>
     * @author renwd
     * @since 2018/12/10
     */
    public List<SeriesCacheVO> querySeriesByCondition(Map<String, Object> queryParam);

    /**
     * 根据品牌Id查询车系信息
     *
     * @param brandId
     * @return java.util.List<com.yonyou.cyxdms.basedata.client.domains.DTO.basedata.SeriesCacheVO>
     * @author guorp
     * @since 2018/12/13
     */
    public List<SeriesCacheVO> getSeriesByBrandId(Long brandId);

    /**
     * @description：据车系名称模糊查询
     * @author     ：quankk
     * @date       ：Created in 2019/1/15 11:49
     * @modified By：
     */
    public List<SeriesCacheVO> seriesBySeriesName(String appId, String seriesName);

    /**
     * @description：查询所有车系
     * @author     ：quankk
     * @date       ：Created in 2019/1/15 17:05
     * @modified By：
     */
    List<SeriesCacheVO> allSeries();

    /**
     *  根据品牌ID查询车系列表信息
     *
     * @author dengqiang
     * @since 2019/1/2
     */
    public List<CarserialInfoVO> queryCarserialInfo(String brandId);

    /**
     *  根据车系ID查询车系详情
     *
     * @author dengqiang
     * @since 2019/1/2
     */
    public CarserialDetailsVO queryCarserialDetails(Long carserialId);

    /**
     * 查询车系信息（pc）
     *
     * @param page
     * @param seriesQueryDTO
     * @author Tansj
     * @since 2019/11/15
     */
    IPage<VehicleProductSeriesVO> queryVehicleProductSeries(Page page, SeriesQueryDTO seriesQueryDTO);

    /**
     * dcs查询车系信息
     *
     * @param page
     * @param queryParam
     * @return java.util.List<com.yonyou.cyxdms.basedata.service.vo.brand.VehicleProductDcsBrandVO>
     * @author renwd
     * @since 2019/7/18
     */
    IPage<VehicleProductSeriesVO> queryDcsVehicleProductBrand(Page page, Map<String, Object> queryParam);

    /**
     * 新增车系
     *
     * @param seriesModifyDTO
     * @return java.lang.Integer
     * @author renwd
     * @since 2019/7/11
     */
    Integer addSeries(SeriesModifyDTO seriesModifyDTO);

    /**
     * 新增车系
     *
     * @param seriesModifyDTO
     * @return java.lang.Integer
     * @author renwd
     * @since 2019/7/11
     */
    Integer addDcsSeries(SeriesModifyDTO seriesModifyDTO);

    /**
     * 修改车系
     *
     * @param id
     * @param seriesModifyDTO
     * @return java.lang.Integer
     * @author renwd
     * @since 2019/7/16
     */
    Integer modifySeries(Long id, SeriesModifyDTO seriesModifyDTO);

    /**
     * 修改车系
     *
     * @param id
     * @param seriesModifyDTO
     * @return java.lang.Integer
     * @author renwd
     * @since 2019/7/16
     */
    Integer modifyDcsSeries(Long id, SeriesModifyDTO seriesModifyDTO);

    /**
     * 车系导出
     *
     * @param queryParam
     * @param request
     * @param response
     * @return void
     * @author renwd
     * @since 2019/7/15
     */
    void exportExcelForSeries(Map<String, Object> queryParam, HttpServletRequest request, HttpServletResponse response);

    /**
     * 车系下拉框
     *
     * @param queryParam
     * @return java.util.List<com.yonyou.cyxdms.basedata.service.vo.series.SeriesDictVO>
     * @author renwd
     * @since 2019/7/16
     */
    List<SeriesDictVO> querySeriesDict(Map<String, Object> queryParam);

    /**
     * 车系下拉框
     *
     * @param queryParam
     * @return java.util.List<com.yonyou.cyxdms.basedata.service.vo.series.SeriesDictVO>
     * @author renwd
     * @since 2019/7/19
     */
    List<SeriesDictVO> queryDcsSeriesDict(Map<String, Object> queryParam);

    /**
     * 车系导入
     *
     * @param importFile
     * @return java.util.List<com.yonyou.cyxdms.basedata.service.dto.vehiclemodel.SeriesImportDTO>
     * @author renwd
     * @since 2019/7/22
     */
    List<SeriesImportDTO> importSeries(MultipartFile importFile);

    /**
     * 是否存在车系
     *
     * @param seriesName
     * @return com.yonyou.cyxdms.basedata.service.entity.series.SeriesPO
     * @author renwd
     * @since 2019/7/22
     */
    SeriesPO existsSeries(String seriesName);


    SeriesDictVO getByCode(String appId, Long brandId, String seriesCode);

    Long queryCarserialByAppidAndName(String appId, String serialName);

    Map<Long, String> querySeriesMapping(String appId);

    void addSeriesGeneral(List<GeneralSeriesDTO> generalSeriesDtos);

    List<SeriesCacheVO> getAllSeriesByAppId(String appId);

    /**
     * 主机厂和本店所有车系下拉框
     *
     * @param brandsId
     * @author Tansj
     * @since 2019/11/14
     */
    List<SeriesDictVO> querySeriesDictAll(String brandsId);

    /**
     * 主机厂和本店所有车系下拉框
     *
     * @param brandsId
     * @author Tansj
     * @since 2019/11/18
     */
    List<SeriesDictVO> querySeriesDictOwner(String brandsId);

    /**
     * 新增编辑界面dcs车系下拉框
     *
     * @param brandsId
     * @author Tansj
     * @since 2019/11/18
     */
    List<SeriesDictVO> queryDcsSeriesDictOwner(String brandsId);


    /**
     * 根据登录信息返回车系数据
     *
     * @param seriesQueryDTO
     * @return java.util.List<com.yonyou.cyxdms.basedata.service.vo.series.VehicleProductSeriesVO>
     * @author caozx
     * @since 2020/12/8
     */
    List<VehicleProductSeriesVO> queryVehicleProductSeries(SeriesQueryDTO seriesQueryDTO);

    List<SeriesDictVO> querySeriesDictAll();
}
